//document.write('<script src="/js/config/config.js"></script>');
String.prototype.startWith=function(str){     
  var reg=new RegExp("^"+str);     
  return reg.test(this);        
}
var host = window.location.host;
var resourceUrl = "";
//提取主域名
var resourceHost = "";
var hostArr=host.split(".");
resourceHost=hostArr[hostArr.length-2]+"."+hostArr[hostArr.length-1];

resourceUrl = window.location.protocol+"//"+resourceHost;
if(host.startWith("localhost") || host.startWith("127.0.0.1")){
	resourceUrl=window.location.protocol+"//"+window.location.host;
}
function addFooterMenu(){
	$("body").prepend('<div style="position:fixed;top:0px;height:33px;width:100%;z-index:99999999;" id="footer_div_id"><iframe src="'+resourceUrl+'/footer_menu.html" style="height:33px;width:100%;" frameborder="0" scrolling="no" seamless/></div>');

}
addFooterMenu();
$(window).scroll(function (){  
    var offsetTop = $(window).height() + $(document).scrollTop()-33;
    offsetTopStr=offsetTop+"px";  
    //$("#footer_div_id").animate({top : offsetTopStr },{ duration:0 , queue:false });
    newPos=new Object();
    newPos.left="0";
    newPos.top=offsetTop;
    $("#footer_div_id").offset(newPos);
});
$(window).scroll();